home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!snorkelwacker!apple!sun-barr!newstop!sun!guinness.ias.edu.edu.
- From: vojta@guinness.ias.edu.edu. (Paul A Vojta)
- Newsgroups: comp.sources.x
- Subject: v07i052: xdvi (dvi previewer), Patch9, Part01/02
- Message-ID: <135891@sun.Eng.Sun.COM>
- Date: 17 May 90 20:36:08 GMT
- Sender: news@sun.Eng.Sun.COM
- Lines: 1727
- Approved: argv@sun.com
-
- Submitted-by: vojta@guinness.ias.edu.edu. (Paul A Vojta)
- Posting-number: Volume 7, Issue 52
- Archive-name: xdvi/patch9.1
- Patch-To: xdvi: Volume 3, Issues 37-39
- Patch-To: Volume 4, Issue 44 (xdvi, Patch4)
- Patch-To: Volume 4, Issue 96 (xdvi, dvi previewer, Patch5)
- Patch-To: Volume 5, Issue 35 (xdvi, dvi previewer, patch 6, part 1/2)
- Patch-To: Volume 5, Issue 36 (xdvi, dvi previewer, patch 6, part 2/2)
- Patch-To: Volume 6, Issue 5 (xdvi, Patch7)
- Patch-To: Volume 6, Issue 49 (xdvi, dvi previewer, patch 8)
-
- Here is patch 9 for xdvi. Mostly it fixes bugs and omissions, such as the -bg
- option when compiled with NOTOOL. It removes the obsolete '=' and '#' options
- under X11, because of a conflict with emacs. And, it includes more VMS related
- files:
- XDVI.RNH VMS help file, written by siemsen@sol.usc.edu
- README.VMS VMS installation file, written by
- allendorf@iowasp.physics.uiowa.edu
-
- This patch also fixes a problem which caused xdvi to dump core when redrawing
- the screen after changing the shrink factor. Thanks to mlm@cs.brown.edu for
- help in pinning this one down.
-
- And finally, the reason this patch is so long is that lines like
- #else TOOLKIT
- have been changed to
- #else /* TOOLKIT */
- in order to comply with ANSI C.
-
- In case the patches relating to xdvi_man.sed are rejected, I would like
- to remind those that are not in the habit of reading these header messages
- that the message attached to Patch 8 requested that you rename xdvi.man.sed
- to xdvi_man.sed.
-
- --Paul Vojta, vojta@guinness.ias.edu
-
- --- cut here ---
- diff -cr old/AUTHOR new/AUTHOR
- *** old/AUTHOR Mon May 7 18:48:12 1990
- --- new/AUTHOR Fri May 4 21:35:53 1990
- ***************
- *** 9,23 ****
- Jeffrey Lee, U of Toronto
- Donald Richardson, Clarkson Univ.
- At the present time, the person to send bug reports to is Paul Vojta,
- - vojta@guinness.ias.edu (temporary; valid through May '90)
- vojta@math.berkeley.edu.
-
- In addition to the various comp.sources.x archives, current versions of this
- ! program can also be obtained via anonymous ftp from the following locations:
- expo.lcs.mit.edu [18.30.0.212] file contrib/xdvi.shar.Z
- ! ucbvax.berkeley.edu [128.32.149.36] file pub/tmp/xdvi.shar.Z
- ! charon.mit.edu [18.80.0.13] file pub/vxdvi.shar.Z
- ! In general, ucbvax will hold the newest version, and charon may be a bit out
- ! of date.
-
- ! Paul Vojta, 13 March 1989.
- --- 9,20 ----
- Jeffrey Lee, U of Toronto
- Donald Richardson, Clarkson Univ.
- At the present time, the person to send bug reports to is Paul Vojta,
- vojta@math.berkeley.edu.
-
- In addition to the various comp.sources.x archives, current versions of this
- ! program can also be obtained via anonymous ftp from the following location:
- expo.lcs.mit.edu [18.30.0.212] file contrib/xdvi.shar.Z
- ! To ease the load on expo, you may also check other X archives, for example:
- ! gatekeeper.dec.com [16.1.0.2] file pub/X11/contrib/xdvi.shar.Z
-
- ! Paul Vojta, 4 May 1990.
- diff -cr old/README new/README
- *** old/README Mon May 7 18:48:18 1990
- --- new/README Mon May 7 19:05:35 1990
- ***************
- *** 177,181 ****
- --- 177,184 ----
- 21. Replaced -pagewidth and -pageheight options with -paper.
- -- Patchlevel 8: --
- 22. Added compatibility for X11R4 and VMS. Fixed up alignment of rules.
- + -- Patchlevel 9: --
- + 23. Removed obsolete '#' and '=' options from the X11 version: they
- + interfere with emacs.
-
- Paul Vojta, vojta@math.berkeley.edu
- diff -cr old/README.VMS new/README.VMS
- *** old/README.VMS Mon May 7 18:51:44 1990
- --- new/README.VMS Wed May 9 22:18:56 1990
- ***************
- *** 0 ****
- --- 1,375 ----
- + NAME
- + ----
- +
- + XDVI - DVI Previewer for VAX VMS systems running the DECWindows software.
- +
- + SYNOPSIS
- + --------
- +
- + XDVI [+[page]] [-s shrink] [-density density] [-p pixels] [-l] [-rv]
- + [-bw width] [-fg color] [-bg color] [-hl color] [-bd color] [-cr color]
- + [-margins inches] [-sidemargin inches] [-topmargin inches]
- + [-paper papertype] [-mgs[n] size] [-altfont font] [-thorough] [-copy]
- + [-geometry geometry] [-icongeometry geometry] [-iconic]
- + [-display display] dvi_file
- +
- + DESCRIPTION
- + -----------
- +
- + XDVI is a program which runs under the DECWindows system. It is used to
- + preview DVI files, such as those produced by TeX and LaTeX.
- +
- + XDVI has the capability of displaying the file reduced by various (integer)
- + factors, and also has a "magnifying glass" which allows one to see a small
- + part of the unshrunk image momentarily.
- +
- + Before displaying any page or part thereof, XDVI checks to see if the DVI
- + file has changed since the last time it was displayed. If this is the case,
- + XDVI will reinitialize itself for the new DVI file. For this reason,
- + exposing parts of the XDVI window while TeX is running should be avoided.
- + This feature allows you to preview many versions of the same file while
- + running XDVI only once.
- +
- + OPTIONS
- + -------
- +
- + In addition to specifying the .DVI file (with or without the .DVI), XDVI
- + supports the following command line options. If the option begins with a "+"
- + instead of a "-", the option is restored to its default value. By default,
- + these options can be set via the resource names given in parentheses in the
- + description of each option.
- +
- + +<page> Specifies the first page to show. If + is given
- + without a number, the last page is assumed; the first
- + page is the default.
- +
- + -s <shrink> (.shrinkFactor) Defines the initial shrink factor.
- + The default value is 3.
- +
- + -density <density> (.densityPercent) Determines the density used when
- + shrinking bitmaps for fonts. A higher value produces a
- + lighter font. The default value is 40.
- +
- + -p <pixels> (.pixelsPerInch) Defines the size of the fonts to use,
- + in pixels per inch. The default value is 300.
- +
- + -l (.listFonts) Causes the names of the fonts used to be
- + listed.
- +
- + -rv (.reverseVideo) Causes the page to be displayed with
- + white characters on a black background, instead of vice
- + versa.
- +
- + -bw <width> (.borderWidth) Specifies the width of the border of
- + the window.
- +
- + -borderwidth <width> Same as -bw.
- +
- + -fg <color> (.foreground) Determines the color of the text
- + (foreground).
- +
- + -foreground <color> Same as -fg.
- +
- + -bg <color> (.background) Determines the color of the background.
- +
- + -background <color> Same as -bg.
- +
- + -hl <color> (.highlight) Determines the color of the page border.
- + The default is the foreground color.
- +
- + -bd <color> (.borderColor) Determines the color of the window
- + border.
- +
- + -bordercolor <color> Same as -bd.
- +
- + -cr <color> (.cursorColor) Determines the color of the cursor.
- + The default is the color of the page border.
- +
- + -margins <inches> (.margins) Specifies the size of both the top and side
- + margins. This can be a decimal number, e.g., 1.5.
- + XDVI determines the "home" position of the page within
- + the window as follows. If the entire page fits in the
- + window, then the margin settings are ignored. If, even
- + after removing the margins from the left, right, top,
- + and bottom, the page still cannot fit in the window,
- + then the page is put in the window such that the top
- + and left margins are hidden, and presumably the upper
- + left-hand corner of the text on the page will be in the
- + upper left-hand corner of the window. Otherwise, the
- + text is centered in the window. See also `M' under the
- + KEYSTROKES section.
- +
- + -sidemargin <inches> (.sideMargin) Specifies the side margin (see above).
- +
- + -topmargin <inches> (.topMargin) Specifies the top and bottom margins (see
- + above).
- +
- + -paper <papertype> (.paper) Specifies the size of the printed page. This
- + may be of the form WxH (or WxHcm), where W is the width
- + in inches (or cm) and H is the height in inches (or
- + cm), respectively. There are also synonyms which may
- + be used: us (8.5x11), usr (11x8.5), legal (8.5x14),
- + foolscap (13.5x17), as well as the ISO sizes a1-a7,
- + b1-b7, c1-c7, a1r-a7r (a1-a7 rotated), etc. The
- + default size is 8.5 x 11 inches.
- +
- + -mgs[n] <size> (.magnifierSize[n]) Specifies the size of the window
- + to be used for the "magnifying glass" for Button n.
- + See the MOUSE ACTIONS section. Defaults are 200, 350,
- + 600, 900, and 1200.
- +
- + -mgs <size> Same as -mgs1.
- +
- + -altfont <font> (.altFont) Declares a default font to use when the
- + font in the DVI file cannot be found. This is useful,
- + for example, with PostScript fonts.
- +
- + -thorough (.thorough) XDVI will usually try to ensure that
- + overstrike characters (e.g., \notin) are printed
- + correctly. On monochrome displays, this is always
- + possible with one logical operation, either AND or OR.
- + On color displays, however, this may take two
- + operations, one to set the appropriate bits and one to
- + clear other bits. If this is the case, then by default
- + XDVI will instead use the copy operation, which does
- + not handle overstriking correctly. The "thorough"
- + option chooses the slower but more correct choice. See
- + also -copy, below.
- +
- + -copy (.copy) Always use the copy operation when writing
- + characters to the display. This option may be
- + necessary for correct operation on a color display, but
- + overstrike characters will be incorrect.
- +
- + -geometry <geometry> (*geometry) Specifies the initial geometry of the
- + window.
- +
- + -icongeometry <geometry> (.iconGeometry) Specifies the initial position for
- + the icon.
- +
- + -iconic (.iconic) Causes the XDVI window to start in the
- + iconic state. The default is to start with the window
- + open.
- +
- + -display <display> Specifies the host, display, and screen to be used for
- + displaying the DVI file. The display must be specified
- + in the form node::display.screen. The default is
- + obtained from the logical name "DECW$DISPLAY", which
- + may be defined using the SET DISPLAY command.
- +
- + KEYSTROKES
- + ----------
- +
- + XDVI recognizes the following keystrokes when typed in its window. Each may
- + optionally be preceded by a (positive or negative) number, whose
- + interpretation will depend on the particular keystroke. Note that the
- + keystrokes are case sensitive.
- +
- + q Quits the program. Control-C and control-D will do this, too.
- +
- + n Moves to the next page (or to the nth next page if a number is given).
- + Synonyms are `f', Space, Return, and Line Feed.
- +
- + p Moves to the previous page (or back n pages). Synonyms are `b',
- + control-H, and Delete.
- +
- + g Moves to the page with the given number. Initially, the first page is
- + assumed to be page number 1, but this can be changed with the `P'
- + keystroke, below. If no page number is given, then it goes to the last
- + page.
- +
- + P "This is page number n." This can be used to make the `g' keystroke
- + refer to actual page numbers instead of absolute page numbers.
- +
- + Control-L Redisplays the current page.
- +
- + ^ Move to the "home" position of the page. This is normally the upper
- + left-hand corner of the page, depending on the margins as described in
- + the -margins option, above.
- +
- + u Moves up two thirds of a window-full.
- +
- + d Moves down two thirds of a window-full.
- +
- + l Moves left two thirds of a window-full.
- +
- + r Moves right two thirds of a window-full.
- +
- + c Moves the page so that the point currently beneath the cursor is moved
- + to the middle of the window. It also (gasp!) warps the cursor to the
- + same place.
- +
- + M Sets the margins so that the point currently under the cursor is the
- + upper left-hand corner of the text in the page. Note that this command
- + itself does not move the image at all. For details on how the margins
- + are used, see the -margins option.
- +
- + s Changes the shrink factor to the given number. If no number is given,
- + the smallest factor that makes the entire page fit in the window will be
- + used. (Margins are ignored in this computation.)
- +
- + S Sets the density factor to be used when shrinking bitmaps. This should
- + be a number between 0 and 100; higher numbers produce lighter
- + characters.
- +
- + R Forces the DVI file to be reread. This allows you to preview many
- + versions of the same file while running XDVI only once.
- +
- + k Normally when XDVI switches pages it moves to the home position as well.
- + The `k' keystroke toggles a `keep-position' flag which, when set, will
- + keep the same position when moving between pages. Also `0k' and `1k'
- + clear and set this flag, respectively.
- +
- + MOUSE ACTIONS
- + -------------
- +
- + If the shrink factor is set to any number other than one, then clicking any
- + mouse button will pop up a "magnifying glass" which shows the unshrunk image
- + in the vicinity of the mouse click. This subwindow disappears when the mouse
- + button is released. Different mouse buttons produce different sized windows,
- + as indicated by the -mgs option. Moving the cursor while holding the button
- + down will move the magnifying glass.
- +
- + Also, the scrollbars (if present) behave in the standard X Window way:
- + pushing Button 2 in a scrollbar moves the top or left edge of the scrollbar
- + to that point and optionally drags it; pushing Button 1 moves the image up
- + or right by an amount equal to the distance from the button press to the
- + upper left-hand corner of the window; pushing Button 3 moves the image down
- + or left by the same amount. Note that this is different than the way
- + DECWindows normally defines the actions of the mouse buttons in scrollbars.
- +
- + LOGICAL NAMES
- + -------------
- +
- + Unless the -display option is used on the command line, XDVI uses the logical
- + name "DECW$DISPLAY" to specify which bit map display terminal to use. This
- + logical name may be defined with the SET DISPLAY command.
- +
- + The logical name "XDVIFONTS" determines the directory path(s) searched for
- + fonts in the following manner. The string consists of one or more strings
- + separated by slashes. In each such string, the substring "%f" is changed to
- + the font name; "%d" is changed to the magnification; and "%p" is changed to
- + the font family ("gf", "pk", or "pxl"). If no "%f" appears in the string,
- + then the string ":%f.%d%p" is added on the end. For example, if the string
- + is "TEX$DISK:[TEX.FONTS.%d]%f.%p" and the font is cmr10 at 300 dpi, then XDVI
- + looks for TEX$DISK:[TEX.FONTS.300]CMR10.GF, TEX$DISK:[TEX.FONTS.300]CMR10.PK,
- + and TEX$DISK:[TEX.FONTS.1500]CMR10.PXL, in that order. If the first
- + character of the "XDVIFONTS" logical name is a slash, then the system default
- + directories are tried first. If the font is not found in the desired size,
- + then XDVI will try to find the nearest size. If the font cannot be found at
- + all, then XDVI will try to vary the point size of the font (within a certain
- + range), and if this fails, then it will use the font specified as the
- + alternate font (cf. -altfont).
- +
- + The logical name "XDVISIZES" must be set to indicate which sizes of fonts are
- + available. It should consists of a list of numbers separated by slashes. If
- + the list begins with a slash, the system default sizes are used, as well.
- + Sizes are expressed in dots per inch; decimals may be used for "pxl" files:
- + for example, a 300 dots per inch file magnified by half a step comes out to
- + 1643 dots per five inches, which should be encoded as 328.6. The current
- + default set of sizes is 300/328.6/360/432/518.4/622/746.4.
- +
- + FILES
- + -----
- +
- + TEX$FONTS System default directory for font pixel files.
- +
- + RESOURCE NAMES
- + --------------
- +
- + All of the command line options may be set via the resource names given in
- + parentheses in the descriptions of the options. This may be used to define a
- + specific set of options as the default each time you run XDVI. To make use
- + of this feature, create a file named DECW$XDEFAULTS.DAT in the same directory
- + as the rest of your DECW*.DAT files. Include in this file the resource names
- + and arguments of each of the options you wish to specify. For example:
- +
- + XDvi.copy: off
- + XDvi.thorough: on
- + XDvi.shrinkFactor: 2
- + XDvi.margins: 0.95
- + XDvi*geometry: 1015x750+3+25
- +
- + When XDVI is invoked, it would behave as if it had been invoked with the
- + following command:
- +
- + XDVI +copy -thorough -s 2 -margins 0.95 -geometry 1015x750+3+25 dvifile
- +
- + Specifying options on the command line will override any options specified
- + via resource names in the DECW$XDEFAULTS.DAT file.
- +
- + INSTALLATION
- + ------------
- +
- + The installation of XDVI on a VMS system is relatively easy. If you have a
- + source-only distribution, you will need to have access to the VAX C compiler
- + to build an executable image. The following steps should get you started:
- +
- + 1) Gather all of the distribution files into one directory, and then create
- + the executable image by executing the MAKE_VMS.COM file:
- +
- + $ @MAKE_VMS
- +
- + 2) Create a help file for XDVI using the supplied XDVI.RNH file:
- +
- + $ RUNOFF XDVI.RNH
- +
- + 3) Insert the resulting XDVI.HLP file into one of your local help libraries:
- +
- + $ LIBRARY /INSERT HELPLIB.HLB XDVI.HLP
- +
- + 4) Modify the command file you use to set up the TEX commands so that it
- + defines the foreign symbol XDVI, and the logical names XDVIFONTS and
- + XDVISIZES. For more information on the expected contents of the logical
- + names, see the LOGICAL NAMES section of this document. The following
- + lines are what I use locally:
- +
- + $ PROC = F$ENVIRONMENT ("PROCEDURE")
- + $ TEXDIR = F$PARSE (PROC, , , "DEVICE", "NO_CONCEAL") + -
- + F$PARSE (PROC, , , "DIRECTORY", "NO_CONCEAL")
- + $ TEXDIR = TEXDIR - "][" - "][" - "][" - "]"
- + $ TEXDISK = TEXDIR + ".]"
- + $ PIXELS = TEXDIR + ".GF.CANON300.]"
- + $ LPIXELS = TEXDIR + ".LOCAL.PIXELS.CANON300.]"
- + $!
- + $! Define the virtual disk devices.
- + $!
- + $ DEFINE /PROCESS /TRANSLATE = (CONCEAL, TERMINAL) PIXELS$ 'PIXELS'
- + $ DEFINE /PROCESS /TRANSLATE = (CONCEAL, TERMINAL) LPIXELS$ 'LPIXELS'
- + $!
- + $! Define the directories for TeX and its related TeXware.
- + $!
- + $ DEFINE TEX$ TEX$DISK:[LOCAL.PROGRAMS]
- + $ DEFINE TEX$PIXELS PIXELS$, LPIXELS$
- + $!
- + $! Define the information necessary to run XDVI.
- + $!
- + $ XDVI :== "$TEX$:XDVI"
- + $ DEFINE XDVIFONTS "TEX$PIXELS:[DPI%d]%f.%p"
- + $ DEFINE XDVISIZES -
- + "300/328.6/360/432/518.4/600/622/746.4/895.8/1075/1200/1290/1548"
- + $ EXIT
- +
- + 5) If you wish, you may create a DECW$XDEFAULTS.DAT file that specifies a
- + default set of command line options. See the RESOURCE NAMES section for
- + more information and an example of what I use locally.
- +
- + If you have any comments about XDVI, or find any bugs in the program, please
- + contact me at the address below. Enjoy!
- +
- + Scott Allendorf
- + Department of Physics and Astronomy
- + The University of Iowa
- + Iowa City, IA 52242
- +
- + Phone: (319) 335-1960
- + Email: allendorf@iowasp.physics.uiowa.edu
- +
- + AUTHORS
- + -------
- +
- + Eric Cooper, CMU, did a version for direct output to a QVSS.
- + Modified for X by Bob Scheifler, MIT Laboratory for Computer Science.
- + Modified for X11 by Mark Eichin, MIT SIPB.
- + Modified for DECWindows by Scott Allendorf, University of Iowa.
- + Additional enhancements by many others.
- diff -cr old/XDVI.RNH new/XDVI.RNH
- *** old/XDVI.RNH Mon May 7 18:51:44 1990
- --- new/XDVI.RNH Wed May 9 22:18:50 1990
- ***************
- *** 0 ****
- --- 1,495 ----
- + .!
- + .! This is a RUNOFF source file that produces a VMS-style HELP library
- + .! for the XDVI program.
- + .!
- + .! This file was created by hand-converting XDVI.MAN. The internal date
- + .! in the XDVI.MAN file was "27 March 1990". If you improve this file,
- + .! please let me know. Pete Siemsen, siemsen@usc.edu
- + .!
- + .! Merged with patchlevel 8.001 help file for VMS by Scott Allendorf.
- + .!
- + .NO PAGING
- + .NO FLAGS ALL
- + .RIGHT MARGIN 70
- + .LITERAL
- + !
- + ! DO NOT EDIT THIS FILE. It was produced by passing a .RNH file through
- + ! RUNOFF. Edit the .RNH file instead.
- + !
- + .END LITERAL
- + .LEFT MARGIN 1
- +
- + .INDENT -1
- + 1 XDVI
- + .BREAK
- + XDVI is a program which runs under the DECWindows system. It is used to
- + preview DVI files, such as those produced by TeX and LaTeX.
- + .SKIP
- + XDVI has the capability of displaying the file reduced by various
- + (integer) factors, and also has a "magnifying glass" which allows one
- + to see a small part of the unshrunk image momentarily.
- + .SKIP
- + Before displaying any page or part thereof, XDVI checks to see if
- + the DVI file has changed since the last time it was displayed. If this
- + is the case, XDVI will reinitialize itself for the new DVI file. For
- + this reason, exposing parts of the XDVI window while TeX is running
- + should be avoided. This feature allows you to preview many versions
- + of the same file while running XDVI only once.
- +
- + .SKIP
- + Format:
- + .SKIP
- + .INDENT +3
- + XDVI [Options] dvi_file
- +
- + .INDENT -1
- + 2 Options
- + .BREAK
- + In addition to specifying the .DVI file (with or without the .DVI),
- + XDVI supports the following command line options. If the option
- + begins with a "+" instead of a "-", the option is restored to its
- + default value. By default, these options can be set via the resource
- + names given in the description of each option.
- + .INDENT -1
- + 3 +
- + .BREAK
- + +<page>
- + .SKIP
- + Specifies the first page to show. If + is given without a number, the
- + last page is assumed; the first page is the default.
- + .INDENT -1
- + 3 -altfont
- + .BREAK
- + -altfont <font>
- + .SKIP
- + Declares a default font to use when the font in the DVI file cannot be
- + found. This is useful, for example, with PostScript fonts.
- + .SKIP
- + The resource name is ".altFont".
- + .INDENT -1
- + 3 -background
- + .BREAK
- + -background <color>
- + .SKIP
- + Same as -bg.
- + .INDENT -1
- + 3 -bd
- + .BREAK
- + -bd <color>
- + .SKIP
- + Determines the color of the window border.
- + .SKIP
- + The resource name is ".borderColor".
- + .INDENT -1
- + 3 -bg
- + .BREAK
- + -bg <color>
- + .SKIP
- + Determines the color of the background.
- + .SKIP
- + The resource name is ".background".
- + .INDENT -1
- + 3 -bordercolor
- + .BREAK
- + -bordercolor <color>
- + .SKIP
- + Same as -bd.
- + .INDENT -1
- + 3 -borderwidth
- + .BREAK
- + -borderwidth <width>
- + .SKIP
- + Same as -bw.
- + .INDENT -1
- + 3 -bw
- + .BREAK
- + -bw <width>
- + .SKIP
- + Specifies the width of the border of the window.
- + .SKIP
- + The resource name is ".borderWidth".
- + .INDENT -1
- + 3 -copy
- + .BREAK
- + Always use the copy operation when writing characters to the display.
- + This option may be necessary for correct operation on a color display,
- + but overstrike characters will be incorrect.
- + .SKIP
- + The resource name is ".copy".
- + .INDENT -1
- + 3 -cr
- + .BREAK
- + -cr <color>
- + .SKIP
- + Determines the color of the cursor. The default is the
- + color of the page border.
- + .SKIP
- + The resource name is ".cursorColor".
- + .INDENT -1
- + 3 -density
- + .BREAK
- + -density <density>
- + .SKIP
- + Determines the density used when shrinking bitmaps for fonts. A
- + higher value produces a lighter font. The default value is 40.
- + .SKIP
- + The resource name is ".densityPercent".
- + .INDENT -1
- + 3 -display
- + .BREAK
- + -display <display>
- + .SKIP
- + Specifies the host, display, and screen to be used for displaying the DVI file.
- + The display must be specified in the form node::display.screen. The default
- + is obtained from the logical name "DECW$DISPLAY", which may be defined using the
- + SET DISPLAY command.
- + .INDENT -1
- + 3 -fg
- + .BREAK
- + -fg <color>
- + .SKIP
- + Determines the color of the text (foreground).
- + .SKIP
- + The resource name is ".foreground".
- + .INDENT -1
- + 3 -foreground
- + .BREAK
- + -foreground <color>
- + .SKIP
- + Same as -fg.
- + .INDENT -1
- + 3 -geometry
- + .BREAK
- + -geometry <geometry>
- + .SKIP
- + Specifies the initial geometry of the window.
- + .SKIP
- + The resource name is "*geometry".
- + .INDENT -1
- + 3 -hl
- + .BREAK
- + -hl <color>
- + .SKIP
- + Determines the color of the page border. The default is the foreground color.
- + .SKIP
- + The resource name is ".highlight".
- + .INDENT -1
- + 3 -icongeometry
- + .BREAK
- + -icongeometry <geometry>
- + .SKIP
- + Specifies the initial position for the icon.
- + .SKIP
- + The resource name is ".iconGeometry".
- + .INDENT -1
- + 3 -iconic
- + .BREAK
- + -iconic
- + .SKIP
- + Causes the XDVI window to start in the iconic state. The default is to start
- + with the window open.
- + .SKIP
- + The resource name is ".iconic".
- + .INDENT -1
- + 3 -l
- + .BREAK
- + Causes the names of the fonts used to be listed.
- + .SKIP
- + The resource name is ".listFonts".
- + .INDENT -1
- + 3 -p
- + .BREAK
- + -p <pixels>
- + .SKIP
- + Defines the size of the fonts to use, in pixels per inch. The
- + default value is 300.
- + .SKIP
- + The resource name is ".pixelsPerInch".
- + .INDENT -1
- + 3 -paper
- + .BREAK
- + -paper <papertype>
- + .SKIP
- + Specifies the size of the printed page. This may be of the form WxH
- + (or WxHcm), where W is the width in inches (or cm) and H is the height
- + in inches (or cm), respectively. There are also synonyms which may be
- + used: us (8.5x11), usr (11x8.5), legal (8.5x14), foolscap (13.5x17),
- + as well as the ISO sizes a1-a7, b1-b7, c1-c7, a1r-a7r (a1-a7 rotated),
- + etc. The default size is 8.5 x 11 inches.
- + .SKIP
- + The resource name is ".paper".
- + .INDENT -1
- + 3 -margins
- + .BREAK
- + -margins <inches>
- + .SKIP
- + Specifies the size of both the top and side margins. This can
- + be a decimal number, e.g., 1.5. XDVI determines the "home" position of
- + the page within the window as follows. If the entire page fits in the
- + window, then the margin settings are ignored. If, even after removing
- + the margins from the left, right, top, and bottom, the page still
- + cannot fit in the window, then the page is put in the window such that
- + the top and left margins are hidden, and presumably the upper
- + left-hand corner of the text on the page will be in the upper
- + left-hand corner of the window. Otherwise, the text is centered in
- + the window. See also `M' under the Keystrokes help entry.
- + .SKIP
- + The resource name is ".margins".
- + .INDENT -1
- + 3 -mgs[n]
- + .BREAK
- + -mgs[n] <size>
- + .SKIP
- + Specifies the size of the window to be used for the "magnifying glass"
- + for Button n. See the MOUSE ACTIONS section.
- + Defaults are 200, 350, 600, 900, and 1200.
- + .SKIP
- + The resource name is ".magnifierSize[n]".
- + .INDENT -1
- + 3 -mgs
- + .BREAK
- + -mgs <size>
- + .SKIP
- + Same as -mgs1.
- + .INDENT -1
- + 3 -rv
- + .BREAK
- + Causes the page to be displayed with white characters on a black
- + background, instead of vice versa.
- + .SKIP
- + The resource name is ".reverseVideo".
- + .INDENT -1
- + 3 -s
- + .BREAK
- + -s <shrink>
- + .SKIP
- + Defines the initial shrink factor. The default value is 3.
- + .SKIP
- + The resource name is ".shrinkFactor".
- + .INDENT -1
- + 3 -sidemargin
- + .BREAK
- + -sidemargin <inches>
- + .SKIP
- + Specifies the side margin (see -margins).
- + .SKIP
- + The resource name is ".sideMargin".
- + .INDENT -1
- + 3 -thorough
- + .BREAK
- + XDVI will usually try to ensure that overstrike characters (e.g.,
- + \notin) are printed correctly. On monochrome displays, this is always
- + possible with one logical operation, either AND or OR. On color
- + displays, however, this may take two operations, one to set the
- + appropriate bits and one to clear other bits. If this is the case,
- + then by default XDVI will instead use the copy operation, which does
- + not handle overstriking correctly. The "thorough" option chooses the
- + slower but more correct choice. See also -copy.
- + .SKIP
- + The resource name is ".thorough".
- + .INDENT -1
- + 3 -topmargin
- + .BREAK
- + -topmargin <inches>
- + .SKIP
- + Specifies the top and bottom margins (see -margins).
- + .SKIP
- + The resource name is ".topMargin".
- +
- + .INDENT -1
- + 2 Keystrokes
- + .BREAK
- + Xdvi recognizes the following keystrokes when typed in its window.
- + Each may optionally be preceded by a (positive or negative) number, whose
- + interpretation will depend on the particular keystroke. Note that the
- + keystrokes are case sensitive.
- + .INDENT -1
- + 3 q
- + .BREAK
- + Quits the program. Control-C and control-D will do this, too.
- + .INDENT -1
- + 3 n
- + .BREAK
- + Moves to the next page (or to the nth next page if a number is given).
- + Synonyms are `f', Space, Return, and Line Feed.
- + .INDENT -1
- + 3 p
- + .BREAK
- + Moves to the previous page (or back n pages). Synonyms are
- + `b', control-H, and Delete.
- + .INDENT -1
- + 3 g
- + .BREAK
- + Moves to the page with the given number. Initially, the first page is
- + assumed to be page number 1, but this can be changed with the `P'
- + keystroke. If no page number is given, then it goes to the last page.
- + .INDENT -1
- + 3 P
- + .BREAK
- + "This is page number n." This can be used to make the `g'
- + keystroke refer to actual page numbers instead of absolute page numbers.
- + .INDENT -1
- + 3 Control-L
- + .BREAK
- + Redisplays the current page.
- + .INDENT -1
- + 3 ^
- + .BREAK
- + Move to the "home" position of the page. This is normally the upper
- + left-hand corner of the page, depending on the margins as described in
- + the -margins option.
- + .INDENT -1
- + 3 u
- + .BREAK
- + Moves up two thirds of a window-full.
- + .INDENT -1
- + 3 d
- + .BREAK
- + Moves down two thirds of a window-full.
- + .INDENT -1
- + 3 l
- + .BREAK
- + Moves left two thirds of a window-full.
- + .INDENT -1
- + 3 r
- + .BREAK
- + Moves right two thirds of a window-full.
- + .INDENT -1
- + 3 c
- + .BREAK
- + Moves the page so that the point currently beneath the cursor is moved to
- + the middle of the window. It also (gasp!) warps the cursor to the same place.
- + .INDENT -1
- + 3 M
- + .BREAK
- + Sets the margins so that the point currently under the cursor is the upper
- + left-hand corner of the text in the page. Note that this command itself does
- + not move the image at all. For details on how the margins are used, see
- + the -margins option.
- + .INDENT -1
- + 3 s
- + .BREAK
- + Changes the shrink factor to the given number. If no number is given, the
- + smallest factor that makes the entire page fit in the window will be used.
- + (Margins are ignored in this computation.)
- + .INDENT -1
- + 3 S
- + .BREAK
- + Sets the density factor to be used when shrinking bitmaps. This should
- + be a number between 0 and 100; higher numbers produce lighter characters.
- + .INDENT -1
- + 3 R
- + .BREAK
- + Forces the dvi file to be reread. This allows you to preview many
- + versions of the same file while running XDVI only once.
- + .INDENT -1
- + 3 k
- + .BREAK
- + Normally when XDVI switches pages it moves to the home position as
- + well. The `k' keystroke toggles a `keep-position' flag which, when
- + set, will keep the same position when moving between pages. Also `0k'
- + and `1k' clear and set this flag, respectively.
- +
- + .INDENT -1
- + 2 Mouse_Actions
- + .BREAK
- + If the shrink factor is set to any number other than one, then
- + clicking any mouse button will pop up a "magnifying glass" which shows
- + the unshrunk image in the vicinity of the mouse click. This subwindow
- + disappears when the mouse button is released. Different mouse buttons
- + produce different sized windows, as indicated by the -mgs option.
- + Moving the cursor while holding the button down will move the
- + magnifying glass.
- + .SKIP
- + Also, the scrollbars (if present) behave in the standard X Window way: pushing
- + Button 2 in a scrollbar moves the top or left edge of the scrollbar to
- + that point and optionally drags it; pushing Button 1 moves the image
- + up or right by an amount equal to the distance from the button press
- + to the upper left-hand corner of the window; pushing Button 3 moves
- + the image down or left by the same amount. Note that this is
- + different than the way
- + DECWindows normally defines the actions of the mouse buttons in scrollbars.
- +
- + .INDENT -1
- + 2 Logical_Names
- + .BREAK
- + Some logical names can be defined to override the values defined when
- + XDVI was compiled.
- + .INDENT -1
- + 3 DECW$DISPLAY
- + .BREAK
- + Unless the -display option is used on the command line, XDVI uses the logical
- + name "DECW$DISPLAY" to specify which bit map
- + display terminal to use. This logical name may be defined with the SET
- + DISPLAY command.
- + .INDENT -1
- + 3 XDVIFONTS
- + .BREAK
- + The logical name "XDVIFONTS" determines the directory path(s) searched for fonts
- + in the following manner. The string consists of one or more strings
- + separated by slashes. In each such string, the substring "%f" is
- + changed to the font name; "%d" is changed to the magnification; and
- + "%p" is changed to the font family ("gf", "pk", or "pxl"). If no "%f"
- + appears in the string, then the string ":%f.%d%p" is added on the end.
- + .SKIP
- + For example, if the string is "TEX$DISK:[TEX.FONTS.%d]%f.%p" and the font is
- + cmr10 at 300dpi, then XDVI looks for TEX$DISK:[TEX.FONTS.300]CMR10.GF,
- + TEX$DISK:[TEX.FONTS.300]CMR10.PK, and TEX$DISK:[TEX.FONTS.1500]CMR10.PXL,
- + in that order.
- + .SKIP
- + If the first character of the "XDVIFONTS" logical name is a slash, then
- + the system default directories are tried first. If the font is not found in
- + the desired size, then XDVI will try to find the nearest size. If the
- + font cannot be found at all, then XDVI will try to vary the point size
- + of the font (within a certain range), and if this fails, then it will
- + use the font specified as the alternate font (cf. -altfont).
- + .INDENT -1
- + 3 XDVISIZES
- + .BREAK
- + The logical name "XDVISIZES" must be set to indicate which
- + sizes of fonts are available. It should consists of a list of numbers
- + separated by slashes. If the list begins with a slash, the system
- + default sizes are used, as well. Sizes are expressed in dots per
- + inch; decimals may be used for "pxl" files: for example, a 300 dots
- + per inch file magnified by half a step comes out to 1643 dots per five
- + inches, which should be encoded as 328.6. The current default set of
- + sizes is 300/328.6/360/432/518.4/622/746.4.
- +
- + .INDENT -1
- + 2 Resource_Names
- + .BREAK
- + All of the command line options may be set via the resource names given in
- + the descriptions of the options. This may be used to define a
- + specific set of options as the default each time you run XDVI. To make use
- + of this feature, create a file named DECW$XDEFAULTS.DAT in the same directory
- + as the rest of your DECW*.DAT files. Include in this file the resource names
- + and arguments of each of the options you wish to specify. For example:
- + .SKIP
- + .LITERAL
- + XDvi.copy: off
- + XDvi.thorough: on
- + XDvi.shrinkFactor: 2
- + XDvi.margins: 0.95
- + XDvi*geometry: 1015x750+3+25
- + .END LITERAL
- + .SKIP
- + When XDVI is invoked, it would behave as if it had been invoked with the
- + following command:
- + .SKIP
- + .LITERAL
- + XDVI +copy -thorough -s 2 -margins 0.95 -geometry 1015x750+3+25 dvifile
- + .END LITERAL
- + .SKIP
- + Specifying options on the command line will override any options specified
- + via resource names in the DECW$XDEFAULTS.DAT file.
- +
- + .INDENT -1
- + 2 Authors
- + .BREAK
- + .LITERAL
- + Eric Cooper, CMU, did a version for direct output to a QVSS.
- + Modified for X by Bob Scheifler, MIT Laboratory for Computer Science.
- + Modified for X11 by Mark Eichin, MIT SIPB.
- + Modified for VMS and DECWindows by Scott Allendorf, University of Iowa.
- + Additional enhancements by many others.
- + .END LITERAL
- diff -cr old/dvi_draw.c new/dvi_draw.c
- *** old/dvi_draw.c Mon May 7 18:48:22 1990
- --- new/dvi_draw.c Sun May 6 18:51:06 1990
- ***************
- *** 50,56 ****
- 0xf, 0x1f, 0x3f, 0x7f,
- 0xff
- };
- ! #else BMSHORT
- unsigned short bit_masks[17] = {
- 0x0, 0x1, 0x3, 0x7,
- 0xf, 0x1f, 0x3f, 0x7f,
- --- 50,56 ----
- 0xf, 0x1f, 0x3f, 0x7f,
- 0xff
- };
- ! #else /* BMSHORT */
- unsigned short bit_masks[17] = {
- 0x0, 0x1, 0x3, 0x7,
- 0xf, 0x1f, 0x3f, 0x7f,
- ***************
- *** 58,65 ****
- 0xfff, 0x1fff, 0x3fff, 0x7fff,
- 0xffff
- };
- ! #endif BMSHORT
- ! #else BMLONG
- unsigned long bit_masks[33] = {
- 0x0, 0x1, 0x3, 0x7,
- 0xf, 0x1f, 0x3f, 0x7f,
- --- 58,65 ----
- 0xfff, 0x1fff, 0x3fff, 0x7fff,
- 0xffff
- };
- ! #endif /* BMSHORT */
- ! #else /* BMLONG */
- unsigned long bit_masks[33] = {
- 0x0, 0x1, 0x3, 0x7,
- 0xf, 0x1f, 0x3f, 0x7f,
- ***************
- *** 71,77 ****
- 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff,
- 0xffffffff
- };
- ! #endif BMLONG
-
- char *malloc();
- Boolean check_dvi_file();
- --- 71,77 ----
- 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff,
- 0xffffffff
- };
- ! #endif /* BMLONG */
-
- char *malloc();
- Boolean check_dvi_file();
- ***************
- *** 91,99 ****
- for (x = bitmap->bytes_wide; x > 0; x -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- for (i = 0; i < BITS_PER_BMUNIT; ++i)
- ! #else MSBITFIRST
- for (i = BITS_PER_BMUNIT - 1; i >= 0; --i)
- ! #endif MSBITFIRST
- putchar((*ptr & (1 << i)) ? '@' : ' ');
- ++ptr;
- }
- --- 91,99 ----
- for (x = bitmap->bytes_wide; x > 0; x -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- for (i = 0; i < BITS_PER_BMUNIT; ++i)
- ! #else
- for (i = BITS_PER_BMUNIT - 1; i >= 0; --i)
- ! #endif
- putchar((*ptr & (1 << i)) ? '@' : ' ');
- ++ptr;
- }
- ***************
- *** 191,211 ****
- bits_left = w;
- #ifndef MSBITFIRST
- bit_shift = bit_skip % BITS_PER_BMUNIT;
- ! #else MSBITFIRST
- bit_shift = BITS_PER_BMUNIT - bit_skip % BITS_PER_BMUNIT;
- ! #endif MSBITFIRST
- n = 0;
- while (bits_left) {
- #ifndef MSBITFIRST
- wid = BITS_PER_BMUNIT - bit_shift;
- ! #else MSBITFIRST
- wid = bit_shift;
- ! #endif MSBITFIRST
- if (wid > bits_left) wid = bits_left;
- if (wid > 4) wid = 4;
- #ifdef MSBITFIRST
- bit_shift -= wid;
- ! #endif MSBITFIRST
- for (cp = ptr; cp < endp; cp = ADD(cp, bytes_wide))
- n += sample_count[(*cp >> bit_shift) & bit_masks[wid]];
- #ifndef MSBITFIRST
- --- 191,211 ----
- bits_left = w;
- #ifndef MSBITFIRST
- bit_shift = bit_skip % BITS_PER_BMUNIT;
- ! #else
- bit_shift = BITS_PER_BMUNIT - bit_skip % BITS_PER_BMUNIT;
- ! #endif
- n = 0;
- while (bits_left) {
- #ifndef MSBITFIRST
- wid = BITS_PER_BMUNIT - bit_shift;
- ! #else
- wid = bit_shift;
- ! #endif
- if (wid > bits_left) wid = bits_left;
- if (wid > 4) wid = 4;
- #ifdef MSBITFIRST
- bit_shift -= wid;
- ! #endif
- for (cp = ptr; cp < endp; cp = ADD(cp, bytes_wide))
- n += sample_count[(*cp >> bit_shift) & bit_masks[wid]];
- #ifndef MSBITFIRST
- ***************
- *** 214,225 ****
- bit_shift = 0;
- ++ptr;
- }
- ! #else MSBITFIRST
- if (bit_shift == 0) {
- bit_shift = BITS_PER_BMUNIT;
- ++ptr;
- }
- ! #endif MSBITFIRST
- bits_left -= wid;
- }
- return n;
- --- 214,225 ----
- bit_shift = 0;
- ++ptr;
- }
- ! #else
- if (bit_shift == 0) {
- bit_shift = BITS_PER_BMUNIT;
- ++ptr;
- }
- ! #endif
- bits_left -= wid;
- }
- return n;
- ***************
- *** 265,273 ****
- cols_left = g->bitmap.w;
- #ifndef MSBITFIRST
- m = (1 << 0);
- ! #else MSBITFIRST
- m = (1 << (BITS_PER_BMUNIT-1));
- ! #endif MSBITFIRST
- cp = new_ptr;
- cols = init_cols;
- while (cols_left) {
- --- 265,273 ----
- cols_left = g->bitmap.w;
- #ifndef MSBITFIRST
- m = (1 << 0);
- ! #else
- m = (1 << (BITS_PER_BMUNIT-1));
- ! #endif
- cp = new_ptr;
- cols = init_cols;
- while (cols_left) {
- ***************
- *** 281,293 ****
- ++cp;
- }
- else m <<= 1;
- ! #else MSBITFIRST
- if (m == (1 << 0)) {
- m = (1 << (BITS_PER_BMUNIT-1));
- ++cp;
- }
- else m >>= 1;
- ! #endif MSBITFIRST
- cols_left -= cols;
- cols = shrink_factor;
- }
- --- 281,293 ----
- ++cp;
- }
- else m <<= 1;
- ! #else
- if (m == (1 << 0)) {
- m = (1 << (BITS_PER_BMUNIT-1));
- ++cp;
- }
- else m >>= 1;
- ! #endif
- cols_left -= cols;
- cols = shrink_factor;
- }
- diff -cr old/dvi_init.c new/dvi_init.c
- *** old/dvi_init.c Mon May 7 18:48:24 1990
- --- new/dvi_init.c Wed May 9 22:39:24 1990
- ***************
- *** 73,79 ****
-
- #ifdef sun
- char *sprintf();
- ! #endif sun
-
- char *malloc();
- FILE *pxl_open();
- --- 73,79 ----
-
- #ifdef sun
- char *sprintf();
- ! #endif
-
- char *malloc();
- FILE *pxl_open();
- ***************
- *** 208,224 ****
- find_postamble()
- {
- ubyte byte;
- - long offset = -4; /* At least 4 TRAILERS */
-
- ! do {
- ! offset -= 1;
- ! Fseek(dvi_file, offset, 2);
- byte = one(dvi_file);
- ! } while (byte == TRAILER);
- if (byte != 2)
- dvi_oops("Wrong version of DVI output for this program");
- ! offset -= 4;
- ! Fseek(dvi_file, offset, 2);
- Fseek(dvi_file, sfour(dvi_file), 0);
- }
-
- --- 208,227 ----
- find_postamble()
- {
- ubyte byte;
-
- ! Fseek(dvi_file, (long) -4, 2);
- ! while (four(dvi_file) !=
- ! ((long) TRAILER << 24 | TRAILER << 16 | TRAILER << 8 | TRAILER))
- ! Fseek(dvi_file, (long) -5, 1);
- ! Fseek(dvi_file, (long) -5, 1);
- ! for (;;) {
- byte = one(dvi_file);
- ! if (byte != TRAILER) break;
- ! Fseek(dvi_file, (long) -2, 1);
- ! }
- if (byte != 2)
- dvi_oops("Wrong version of DVI output for this program");
- ! Fseek(dvi_file, (long) -5, 1);
- Fseek(dvi_file, sfour(dvi_file), 0);
- }
-
- diff -cr old/gf.c new/gf.c
- *** old/gf.c Mon May 7 18:48:26 1990
- --- new/gf.c Wed May 9 22:39:18 1990
- ***************
- *** 81,87 ****
- /*
- * Find postamble.
- */
- ! Fseek(GF_file, (long) -5, 2);
- for (;;) {
- ch = one(GF_file);
- if (ch != TRAILER) break;
- --- 81,91 ----
- /*
- * Find postamble.
- */
- ! Fseek(GF_file, (long) -4, 2);
- ! while (four(GF_file) !=
- ! ((long) TRAILER << 24 | TRAILER << 16 | TRAILER << 8 | TRAILER))
- ! Fseek(GF_file, (long) -5, 1);
- ! Fseek(GF_file, (long) -5, 1);
- for (;;) {
- ch = one(GF_file);
- if (ch != TRAILER) break;
- ***************
- *** 274,285 ****
- if (paint_switch)
- *cp |= bit_masks[count] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #endif MSBITFIRST
- word_weight -= count;
- #ifdef MSBITFIRST
- if (paint_switch)
- *cp |= bit_masks[count] << word_weight;
- ! #endif MSBITFIRST
- break;
- }
- else {
- --- 278,289 ----
- if (paint_switch)
- *cp |= bit_masks[count] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #endif
- word_weight -= count;
- #ifdef MSBITFIRST
- if (paint_switch)
- *cp |= bit_masks[count] << word_weight;
- ! #endif
- break;
- }
- else {
- ***************
- *** 287,295 ****
- #ifndef MSBITFIRST
- *cp |= bit_masks[word_weight] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #else MSBITFIRST
- *cp |= bit_masks[word_weight];
- ! #endif MSBITFIRST
- cp++;
- count -= word_weight;
- word_weight = BITS_PER_BMUNIT;
- --- 291,299 ----
- #ifndef MSBITFIRST
- *cp |= bit_masks[word_weight] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #else
- *cp |= bit_masks[word_weight];
- ! #endif
- cp++;
- count -= word_weight;
- word_weight = BITS_PER_BMUNIT;
- diff -cr old/patchlevel.h new/patchlevel.h
- *** old/patchlevel.h Mon May 7 18:48:28 1990
- --- new/patchlevel.h Fri May 4 21:36:00 1990
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 8
- --- 1 ----
- ! #define PATCHLEVEL 9
- diff -cr old/pk.c new/pk.c
- *** old/pk.c Mon May 7 18:48:30 1990
- --- new/pk.c Sun May 6 18:55:30 1990
- ***************
- *** 255,263 ****
- cp = ADD(g->bitmap.bits, i * bytes_wide);
- #ifndef MSBITFIRST
- row_bit_pos = -1;
- ! #else MSBITFIRST
- row_bit_pos = BITS_PER_BMUNIT;
- ! #endif MSBITFIRST
- for (j = 0; j < g->bitmap.w; j++) /* get one row */
- {
- if (--PK_bitpos < 0)
- --- 255,263 ----
- cp = ADD(g->bitmap.bits, i * bytes_wide);
- #ifndef MSBITFIRST
- row_bit_pos = -1;
- ! #else
- row_bit_pos = BITS_PER_BMUNIT;
- ! #endif
- for (j = 0; j < g->bitmap.w; j++) /* get one row */
- {
- if (--PK_bitpos < 0)
- ***************
- *** 267,282 ****
- }
- #ifndef MSBITFIRST
- if (++row_bit_pos >= BITS_PER_BMUNIT)
- ! #else MSBITFIRST
- if (--row_bit_pos < 0)
- ! #endif MSBITFIRST
- {
- cp++;
- #ifndef MSBITFIRST
- row_bit_pos = 0;
- ! #else MSBITFIRST
- row_bit_pos = BITS_PER_BMUNIT - 1;
- ! #endif MSBITFIRST
- }
- if (word & (1 << PK_bitpos))
- *cp |= 1 << row_bit_pos;
- --- 267,282 ----
- }
- #ifndef MSBITFIRST
- if (++row_bit_pos >= BITS_PER_BMUNIT)
- ! #else
- if (--row_bit_pos < 0)
- ! #endif
- {
- cp++;
- #ifndef MSBITFIRST
- row_bit_pos = 0;
- ! #else
- row_bit_pos = BITS_PER_BMUNIT - 1;
- ! #endif
- }
- if (word & (1 << PK_bitpos))
- *cp |= 1 << row_bit_pos;
- ***************
- *** 302,313 ****
- if (paint_switch)
- word |= bit_masks[count] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #endif MSBITFIRST
- h_bit -= count;
- word_weight -= count;
- #ifdef MSBITFIRST
- if (paint_switch) word |= bit_masks[count] << word_weight;
- ! #endif MSBITFIRST
- count = 0;
- }
- else
- --- 302,313 ----
- if (paint_switch)
- word |= bit_masks[count] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #endif
- h_bit -= count;
- word_weight -= count;
- #ifdef MSBITFIRST
- if (paint_switch) word |= bit_masks[count] << word_weight;
- ! #endif
- count = 0;
- }
- else
- ***************
- *** 317,325 ****
- word |= bit_masks[h_bit] <<
- #ifndef MSBITFIRST
- (BITS_PER_BMUNIT - word_weight);
- ! #else MSBITFIRST
- (word_weight - h_bit);
- ! #endif MSBITFIRST
- *cp++ = word;
- /* "output" row(s) */
- for (i = PK_repeat_count * bytes_wide /
- --- 317,325 ----
- word |= bit_masks[h_bit] <<
- #ifndef MSBITFIRST
- (BITS_PER_BMUNIT - word_weight);
- ! #else
- (word_weight - h_bit);
- ! #endif
- *cp++ = word;
- /* "output" row(s) */
- for (i = PK_repeat_count * bytes_wide /
- ***************
- *** 341,349 ****
- #ifndef MSBITFIRST
- word |= bit_masks[word_weight] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #else MSBITFIRST
- word |= bit_masks[word_weight];
- ! #endif MSBITFIRST
- *cp++ = word;
- word = 0;
- count -= word_weight;
- --- 341,349 ----
- #ifndef MSBITFIRST
- word |= bit_masks[word_weight] <<
- (BITS_PER_BMUNIT - word_weight);
- ! #else
- word |= bit_masks[word_weight];
- ! #endif
- *cp++ = word;
- word = 0;
- count -= word_weight;
- diff -cr old/pxl.c new/pxl.c
- *** old/pxl.c Mon May 7 18:48:30 1990
- --- new/pxl.c Thu May 10 10:42:09 1990
- ***************
- *** 7,15 ****
- ***/
-
- #ifndef MSBITFIRST
- - #ifndef X10
- - extern unsigned char _reverse_byte[]; /* defined in Xlib */
- - #else X10
- static unsigned char _reverse_byte[0x100] = {
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- --- 7,12 ----
- ***************
- *** 44,51 ****
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
- };
- ! #endif X10
- ! #endif MSBITFIRST
-
- static void read_index(), read_char();
-
- --- 41,47 ----
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
- };
- ! #endif /* MSBITFIRST */
-
- static void read_index(), read_char();
-
- ***************
- *** 53,63 ****
-
- static void
- read_index (fontp)
- ! register struct font *fontp;
- {
- register struct glyph *g;
- register FILE *fp;
- ! long font_dir_ptr;
-
- if (debug & DBG_PK)
- Printf("Reading header for PXL file %s\n", fontp->filename);
- --- 49,59 ----
-
- static void
- read_index (fontp)
- ! register struct font *fontp;
- {
- register struct glyph *g;
- register FILE *fp;
- ! long font_dir_ptr;
-
- if (debug & DBG_PK)
- Printf("Reading header for PXL file %s\n", fontp->filename);
- ***************
- *** 65,75 ****
- if (four(fp = fontp->file) != 1001)
- oops("File %s has wrong PXL magic number.", fontp->filename);
- /* seek to trailer info */
- ! Fseek(fp, (long) -5 * 4, 2);
- (void) four(fp); /* checksum */
- (void) four(fp); /* magnify */
- (void) four(fp); /* design size */
- ! font_dir_ptr = sfour(fp) * 4;
- (void) four(fp); /* pxl id word */
- /* seek to font directory */
- Fseek(fp, font_dir_ptr, 0);
- --- 61,74 ----
- if (four(fp = fontp->file) != 1001)
- oops("File %s has wrong PXL magic number.", fontp->filename);
- /* seek to trailer info */
- ! Fseek(fp, (long) -4, 2);
- ! while (four(fp) != 1001)
- ! Fseek(fp, (long) -5, 1);
- ! Fseek(fp, (long) -5 * 4, 1);
- (void) four(fp); /* checksum */
- (void) four(fp); /* magnify */
- (void) four(fp); /* design size */
- ! font_dir_ptr = sfour(fp) * 4;
- (void) four(fp); /* pxl id word */
- /* seek to font directory */
- Fseek(fp, font_dir_ptr, 0);
- ***************
- *** 130,136 ****
- register int i, j;
- #ifndef BMLONG
- register int padding_length;
- ! #endif BMLONG
-
- bitmap = &fontp->glyph[ch].bitmap;
- /* in file, bitmap rows are multiples of 32 bits wide */
- --- 129,135 ----
- register int i, j;
- #ifndef BMLONG
- register int padding_length;
- ! #endif
-
- bitmap = &fontp->glyph[ch].bitmap;
- /* in file, bitmap rows are multiples of 32 bits wide */
- ***************
- *** 138,144 ****
- ptr = (BMUNIT *) bitmap->bits;
- #ifndef BMLONG
- padding_length = 3 - (bitmap->bytes_wide + 3) % 4;
- ! #endif BMLONG
- for (i = bitmap->h; i > 0; --i) {
- for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- --- 137,143 ----
- ptr = (BMUNIT *) bitmap->bits;
- #ifndef BMLONG
- padding_length = 3 - (bitmap->bytes_wide + 3) % 4;
- ! #endif
- for (i = bitmap->h; i > 0; --i) {
- for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- ***************
- *** 149,170 ****
- #ifdef BMLONG
- *ptr |= _reverse_byte[one(fp)] << 16;
- *ptr |= _reverse_byte[one(fp)] << 24;
- ! #endif BMLONG
- ! #else MSBITFIRST
- *ptr = 0;
- #ifdef BMLONG
- *ptr |= one(fp) << 24;
- *ptr |= one(fp) << 16;
- ! #endif BMLONG
- #if BYTES_PER_BMUNIT > 1
- *ptr |= one(fp) << 8;
- #endif
- *ptr |= one(fp);
- ! #endif MSBITFIRST
- ++ptr;
- }
- #ifndef BMLONG
- for (j = padding_length; j > 0; --j) (void) one(fp);
- ! #endif BMLONG
- }
- }
- --- 148,169 ----
- #ifdef BMLONG
- *ptr |= _reverse_byte[one(fp)] << 16;
- *ptr |= _reverse_byte[one(fp)] << 24;
- ! #endif
- ! #else /* MSBITFIRST */
- *ptr = 0;
- #ifdef BMLONG
- *ptr |= one(fp) << 24;
- *ptr |= one(fp) << 16;
- ! #endif
- #if BYTES_PER_BMUNIT > 1
- *ptr |= one(fp) << 8;
- #endif
- *ptr |= one(fp);
- ! #endif /* MSBITFIRST */
- ++ptr;
- }
- #ifndef BMLONG
- for (j = padding_length; j > 0; --j) (void) one(fp);
- ! #endif
- }
- }
- diff -cr old/pxl_open.c new/pxl_open.c
- *** old/pxl_open.c Mon May 7 18:48:32 1990
- --- new/pxl_open.c Tue May 8 22:34:36 1990
- ***************
- *** 36,42 ****
-
- #ifndef X10
- #include <X11/Xos.h> /* same as below */
- ! #else X10
- #ifdef SYSV
- #include <string.h>
- #define index strchr
- --- 36,42 ----
-
- #ifndef X10
- #include <X11/Xos.h> /* same as below */
- ! #else /* X10 */
- #ifdef SYSV
- #include <string.h>
- #define index strchr
- ***************
- *** 44,72 ****
- #else /* SYSV */
- #include <strings.h>
- #endif /* SYSV */
- ! #endif X10
-
- #include <errno.h>
- extern int errno;
-
- #ifndef VMS
- #define PATH_SEP ':'
- #define DEFAULT_TAIL "/%f.%d%p"
- ! #else VMS
- #include <string.h>
- #define index strchr
- #define rindex strrchr
- #define PATH_SEP '/'
- #define DEFAULT_TAIL ":%f.%d%p"
- ! #endif VMS
-
- #ifndef OPEN_MODE
- #ifndef VMS
- #define OPEN_MODE "r"
- ! #else VMS
- #define OPEN_MODE "r", "ctx=stm"
- ! #endif VMS
- ! #endif OPEN_MODE
-
- extern int n_fonts_left;
- extern char *alt_font;
- --- 44,76 ----
- #else /* SYSV */
- #include <strings.h>
- #endif /* SYSV */
- ! #endif /* X10 */
-
- #include <errno.h>
- extern int errno;
-
- + /*
- + * If you think you have to change DEFAULT_TAIL, then you haven't read the
- + * documentation closely enough.
- + */
- #ifndef VMS
- #define PATH_SEP ':'
- #define DEFAULT_TAIL "/%f.%d%p"
- ! #else /* VMS */
- #include <string.h>
- #define index strchr
- #define rindex strrchr
- #define PATH_SEP '/'
- #define DEFAULT_TAIL ":%f.%d%p"
- ! #endif /* VMS */
-
- #ifndef OPEN_MODE
- #ifndef VMS
- #define OPEN_MODE "r"
- ! #else
- #define OPEN_MODE "r", "ctx=stm"
- ! #endif
- ! #endif /* OPEN_MODE */
-
- extern int n_fonts_left;
- extern char *alt_font;
- ***************
- *** 84,90 ****
-
- #ifdef sun
- char *sprintf();
- ! #endif sun
-
- char *malloc(), *getenv();
- double atof();
- --- 88,94 ----
-
- #ifdef sun
- char *sprintf();
- ! #endif
-
- char *malloc(), *getenv();
- double atof();
- diff -cr old/tpic.c new/tpic.c
- *** old/tpic.c Mon May 7 18:48:34 1990
- --- new/tpic.c Sun May 6 19:02:04 1990
- ***************
- *** 29,35 ****
- #ifndef lint
- static char *rcsid =
- "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $";
- ! #endif lint
-
- #include <math.h>
- #include <stdio.h>
- --- 29,35 ----
- #ifndef lint
- static char *rcsid =
- "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $";
- ! #endif
-
- #include <math.h>
- #include <stdio.h>
-
- dan
- ----------------------------------------------------
- O'Reilly && Associates argv@sun.com / argv@ora.com
- Opinions expressed reflect those of the author only.
-